<template>
	<view>
		<view class="bgc">
			
		</view>
		<view class="content">
			<div class="cart">
				<view class="cart-one">
					<view class="cart-one-left">
						成交金额1000/元 <view class="text">已完成订单才计入成交</view>
					</view>
					<view class="cart-one-right">
						今天 <u-icon name="arrow-down" color="#154EA5" size="16" style="margin-left: 5rpx;"></u-icon>
					</view>
				</view>
				<view class="cart-price">
					0.00
				</view>
				<view class="cart-list">
					<view class="cart-list-one">
						<view class="name">
							成交订单
						</view>
						<view class="count">
							0
						</view>
					</view>
					<view class="cart-list-one">
						<view class="name">
							商品数量
						</view>
						<view class="count">
							100
						</view>
					</view>
					<view class="cart-list-one">
						<view class="name">
							转化率
						</view>
						<view class="count">
							0.0%
						</view>
					</view>
				</view>
			</div>
			
			<div class="cart1">
				<view class="cart-list">
					<view class="cart-list-one"  @tap="goPath(1)">
						<view class="name">
							<image style="width: 64rpx;height: 64rpx;" src="../../static/image/1.png" mode="widthFix"></image>
						</view>
						<view class="count">
							库存商品
						</view>
					</view>
					<view class="cart-list-one"  @tap="goPath(2)">
						<view class="name">
							<image style="width: 64rpx;height: 64rpx;" src="../../static/image/2.png" mode="widthFix"></image>
						</view>
						<view class="count">
							分类管理
						</view>
					</view>
					<view class="cart-list-one" @tap="goPath(3)">
						<view class="name">
							<image style="width: 64rpx;height: 64rpx;" src="../../static/image/3.png" mode="widthFix" ></image>
						</view>
						<view class="count">
							新增商品
						</view>
					</view>
				</view>
			</div>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onShow() {
			if(uni.getStorageSync('userInfo')){
				
			}else{
				uni.showToast({
					icon:'error',
					title:'登录失效'
				})
				setTimeout(()=>{
					uni.navigateTo({
						url:'/pages/login/login'
					})
				},500)
				
			}
		},
		methods: {
			goPath(index){
				if(index==1){
					uni.navigateTo({
						url:'/pages/goods/goodslist/goodslist'
					})
					
				}else if(index==2){
					uni.navigateTo({
						url:'/pages/goods/classificationList/classificationList'
					})
				}else if(index==3){
					uni.navigateTo({
						url:'/pages/goods/goodsAdd/goodsAdd'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #DEEAFF;
	}
	.bgc{
		background-color: #6DA7FF;
		height: 436rpx;
	}
	.content{
		padding: 40rpx;
		width: 100%;
		box-sizing: border-box;
		position: fixed;
		top: 50rpx;
		.cart{
			padding:30rpx 40rpx;
			border-radius: 20rpx;
			background: linear-gradient(-13deg, #CFDDF8 0%, #6DA7FF 52%, #92BDFF 100%);
			.cart-one{
				display: flex;
				justify-content: space-between;
				align-items: center;
				.cart-one-left{
					font-size: 38rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					.text{
						font-size: 22rpx;
						color: #EFF5FF;
						margin-top: 10rpx;
						// margin-left: 20rpx;
					}
				}
				.cart-one-right{
					width: 143rpx;
					height: 44rpx;
					background: #DCEAFF;
					border-radius: 22rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #154EA5;
				}
			}
			.cart-price{
				font-size: 80rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				padding: 40rpx 0 60rpx;
			}
			.cart-list{
				padding:0 30rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				.cart-list-one{
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					align-items: center;
					.name{
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #EFF5FF;
					}
					.count{
						font-size: 42rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #EFF5FF;
					}
				}
			}
			
		}
		.cart1{
			padding:100rpx 40rpx;
			border-radius: 20rpx;
			background: #fff;
			margin-top: 40rpx;
			.cart-list{
				display: flex;
				justify-content: space-between;
				align-items: center;
				flex-wrap: wrap;
				.cart-list-one{
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					align-items: center;
					.name{
					
					}
					.count{
						font-size: 30rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #0D3E88;
					}
				}
			}
			
		}
	}

</style>
